<template>

<button @click="login()">login</button>
<button @click="register()">register</button>

</template>

<script setup>

    function login(){
      var path = 'https://gitee.com/oauth/authorize?';
      var queryParams = ['client_id=ba92f844c06bf93080ad7fc1b86468a002305bc1a859e753eaffdf0d712b9351',
      'redirect_uri=http%3a%2f%2flocalhost%3a5173%2fgiteeLogin',
      'response_type=code'];

    var query = queryParams.join('&');
    var url = path + query;
    window.location.href= url;
    }

    function register(){
      var path = 'https://gitee.com/oauth/authorize?';
      var queryParams = ['client_id=ba92f844c06bf93080ad7fc1b86468a002305bc1a859e753eaffdf0d712b9351',
      'redirect_uri=http%3a%2f%2flocalhost%3a5173%2fgiteeRegister',
      'response_type=code'];

    var query = queryParams.join('&');
    var url = path + query;
    window.location.href= url;
    }
</script>
